package com.brillilab.service.module.message.template.impl.reagent;

import com.brillilab.service.module.message.template.AbstractMessageTemplate;
import com.brillilab.service.module.message.template.enums.MessageTypeEnum;
import lombok.Data;

/**
 * @author zlb
 * @Title: ReagentShareTemp
 * @ProjectName brill_lab
 * @Description: 试剂分享模板
 * @date 2019/5/27 17:18
 */
@Data
public class ReagentShareTemp extends AbstractMessageTemplate {
    private String shareUserName;
    private String savePath;
    private String reagentName;

    /**
     * 试剂分享
     *
     * @param labId         实验室Id
     * @param receiverId    接收人Id
     * @param labMemberId   接收者实验室成员Id
     * @param shareUserName 分享用户姓名
     * @param savePath      试剂存储路径
     * @param reagentName   试剂名称
     */
    public ReagentShareTemp(Long labId, Long receiverId,Long labMemberId, String shareUserName, String savePath, String reagentName) {
        super(labId, receiverId);
        super.setType(MessageTypeEnum.ReagentShare.getValue());
        super.setTitle("有成员给您分享试剂");
        String content = String.format(
                        "<span style='color:#F6AC2D'>%s</span>" + "<span>分享了位于</span>" +
                        "<span style='color:#F6AC2D'>%s</span>" + "<span>的</span>" +
                        "<span style='color:#F6AC2D'>%s</span>" + "<span>给您。</span>",
                shareUserName, savePath, reagentName);
        super.setContent(content);
        super.setAppContent(String.format("%s分享了位于%s的%s给您",shareUserName, savePath, reagentName));
        this.labMemberId=labMemberId;
        this.shareUserName = shareUserName;
        this.savePath = savePath;
        this.reagentName = reagentName;
    }

}
